<!--#include file="../inc/easp/easp.asp"-->
<!--#include file="../inc/Conn1.asp"-->
<!--#include file="../inc/checklogin.asp"-->
<!--#include file="../inc/page.asp"-->
<% CheckLogin("../index.asp") %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>User Control</title>
<link rel="stylesheet" type="text/css" href="../css/theme.css" />
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<script type="text/javascript">
	var StyleFile = "theme" + document.cookie.charAt(6) + ".css";
	document.writeln('<link rel="stylesheet" type="text/css" href="../css/' + StyleFile + '">');
</script>
<script language="javascript" type="text/javascript">
	function deletexml(uid)
	{
		if(confirm("Are you sure?"))
		{
			top.location.href = "del.asp?uid=" + uid;
		}
		else
		{
			
		}
	}
</script>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="../css/ie-sucks.css" />
<![endif]-->
</head>
<body>
<div id="container">
	<div id="header">
    <div id="divAccount" style="float:right;">
        <a href="../user/account.asp" style="color:white">Account</a>&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="../inc/logout.asp" style="color:white">Logout</a>
      </div>
		<h2>User Control</h2>
		<div id="topmenu">
			<ul>
				<li><a href="../main.asp">Home</a></li>
				<li><a href="../Country/index.asp">Country</a></li>
				<li><a href="../Holiday/index.asp">Holiday</a></li>
				<li><a href="../Times/index.asp">Times</a></li>
				<li><a href="../wallboard/index.asp">WallBoard</a></li>
				<%
				   If Session("Authority")="0" Then 
				       Response.Write("<li class=""current""><a href='#'>User</a></li>")
				   End if
				%>
				<li><% If Session("Passed")=true Then %><a href="../inc/logout.asp">Logout</a><% End If %></li>
			</ul>
		</div>
	</div>
	<div id="top-panel">
		<div id="panel">
			<ul>
				<li><a href="add.asp" class="useradd">Add User</a></li>
			</ul>
		</div>
	</div>
	<div id="wrapper">
		<div id="content">
			<form id="form" action="Country.asp" method="post">
				<div id="box">
					<div id="rightnow">
				    <h3 class="reallynow"> 
					    <span>User Control</span>					    
					    <a href="add.asp" class="useradd">&nbsp;&nbsp;&nbsp;Add User</a> 
					    <br />
				    </h3>				
			    </div>
					<table width="100%" style="text-align: center;">
						<thead>
							<tr>
								<th width="81" class="a-center"><a href="#">NO.</a></th>
								<th width="160"><a href="#">UserName</a></th>
								<th width="360" class="a-center"><a href="#">Operate</a></th>
								<th>Details</th>
							</tr>
						</thead>
						<tbody>
							<%
							  dim rs1
							  set rs1 = Easp.db.GetRecordBySql("select * from [user] where Authority<>0")
							  If not Easp.IsN(rs1) Then
							  	dim mm
							  	Set mm = new Cls_PageView
							  	With mm
							  	  .PageSize = 10
						        .GetConn = Conn
						        .GetTbName = "[user]"
	                  .GetField = "ID,g_id,Name,PassWord,Authority"
	                  .GetWhere = "Authority<>0"
	                  .GetKey = "ID"
	                  .GetOrder = "ID"
							    End With
							    
							    dim rs,iPageindex,iCount
							    set rs = mm.GetRs()
							    iPageindex = CInt(Easp.Get("Page"))
							    if iPageindex = 0 Then iPageindex = 1
							    iCount = 1
							    if Not Easp.IsN(rs) Then
							    	while	not rs.eof
							    	  Easp.wc "<tr>"
							    	  Easp.wc "<td class=""a-center"">" & (iCount + (iPageIndex - 1) * 10) & "</td>"
							    	  Easp.wc "<td>" & rs("Name") & "</td>"
							    	  Easp.wc "<td>"
							    	  Easp.wc "  <a href='modify.asp?uid=" & rs("ID") & "&gid=" & rs("g_id") & "&auth=" & rs("Authority") & "'>Modify</a>&nbsp;&nbsp;&nbsp;&nbsp;"
							    	  Easp.wc "  <a href=""javascript:deletexml('" & rs("ID") & "')"">Delete</a>"
							    	  Easp.wc "</td>"
							    	  Easp.wc "<td><a href='details.asp?uid=" & rs("ID") & "'>Details</a></td>"
							    	  Easp.wc "</tr>"
							    	  
							    	  iCount = iCount + 1
							    	  rs.MoveNext()
							    	wend
							    Else
							    	'没有找到记录
							    End If
							  End If							  
							%>
						</tbody>
					</table>
					<div id="pager">
						<%
						  If Not Easp.IsN(rs1) Then
						    Easp.wc(mm.ShowPage())'显示分页
						    Easp.db.C(rs)						 
						  End If
						  Easp.db.C(rs1)
						%>
					</div>
				</div>
			</form>
		</div>
	</div>
	<!--#include file="../inc/footer.asp" -->
</div>
</body>
</html>
